<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@include file="../../../commons/taglib.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>药品盘点</title>
<link rel="stylesheet" href="${ctx}/static/css/pintuer.css">
    <link rel="stylesheet" href="${ctx}/static/css/admin.css">
    <script src="${ctx}/static/js/jquery.js"></script>
    <script src="${ctx}/static/js/pintuer.js"></script> 
</head>
<body>
	<div class="panel admin-panel">
		<div class="panel-head">
			<a href="inventory1">《 返回上一级</a> | 实盘数录入明细
			<div style="float: right;">
		    	<a class="button border-main" href="inventory1add"> 导出Excel</a>
				<!-- <button class="button border-main excel" type="submit"> 导出Excel</button> -->
			    <a class="button border-main" href="inventory4"> 刷新</a>
			</div>
			<div style="clear: both;"></div>
		</div>
		<div class="padding border-bottom">
			<form method="post" action="su_serach">
				<ul class="search" style="padding-left:10px;">
					<li>
						<input type="text" class="input" value="" id="search" placeholder="名称搜索" />
					</li>
					<li>
						<button class="button border-main" type="submit"> 查询</button>
					</li>
					<li>
						<a href="inventory">清除搜索</a>
					</li>
				</ul>
			</form>
		</div>
		<table class="table table-hover text-center">
		<tr>
			<th width="8%" style="text-align: center;"> ID</th>
			<th style="text-align: center;">药品名称</th>
			<th style="text-align: center;">规格</th>
			<th style="text-align: center;">当前库存</th>
			<th style="text-align: center; width: 8%;">实盘数</th>
			<th style="text-align: center;">进货价</th>
			<th style="text-align: center;">零售价</th>
			<th style="text-align: center;">单位</th>
		</tr>
		<c:forEach items="${drug }" var="list">
			<tr>
				<td style="border-bottom: 1px solid #ddd;"><input type="hidden" name="id" value="${list.id }"/>${list.id }</td>
				<td style="border-bottom: 1px solid #ddd;"><input type="hidden" name="name" value="${list.name }"/>${list.name }</td>
				<td style="border-bottom: 1px solid #ddd;"><input type="hidden" name="spec" value="${list.spec }"/>${list.spec }</td>
				<td style="border-bottom: 1px solid #ddd;"><input type="hidden" name="tory" value="${list.tory }"/>${list.tory }</td>
				<td style="border-bottom: 1px solid #ddd;"><input type="number" name="sp_tory" value="0" class="input"/></td>
				<td style="border-bottom: 1px solid #ddd;"><input type="hidden" name="p_price" value="${list.p_price }"/>${list.p_price }</td>
				<td style="border-bottom: 1px solid #ddd;"><input type="hidden" name="price" value="${list.price }"/>${list.price }</td>
				<td style="border-bottom: 1px solid #ddd;"><input type="hidden" name="unit" value="${list.unit }"/>${list.unit }</td>
			</tr>
		</c:forEach>
		<c:if test="${ pageNumber!=null }">
			<tr>
				<td colspan="7">
					<div class="pagelist">
						<a href="detection?pageNumber=1">首页</a>
						<%-- <%if(){} %> --%>
						<c:if test="${ 1 != pageNumber && pageNumber >0 }">
							<a href="inventory?pageNumber=${pageNumber-1 }">上一页</a>
						</c:if>
						
						<c:if test="${ 0 != pageNumber-1 && 1 != pageNumber-1 && pageNumber >0 }">
							...
						</c:if>
						
						<c:if test="${ 1 != pageNumber && pageNumber >0 }">
							<a href="inventory?pageNumber=${pageNumber-1 }">${pageNumber-1 }</a>
						</c:if>
						
						<a href="inventory?pageNumber=${pageNumber }">${pageNumber }</a>
						
						<c:if test="${ Pages != pageNumber && pageNumber >0 }">
							<a href="inventory?pageNumber=${pageNumber+1 }">${pageNumber+1 }</a>
						</c:if>
						
						<c:if test="${ Pages != pageNumber && Pages != pageNumber+1 && pageNumber >0 }">
							...
						</c:if>
						
						<c:if test="${Pages != pageNumber && pageNumber >0 }">
							<a href="inventory?pageNumber=${pageNumber+1 }">下一页</a>
						</c:if>
						
						<a href="inventory?pageNumber=${Pages }">尾页</a>
						第${pageNumber }页/共${Pages }页
					</div>
				</td>
			</tr>
		</c:if>
		</table>
	</div>
</body>
<script type="text/javascript">
function change(data){
	if(data==1){
		window.location="inventory";
	}
	if(data==2){
		window.location="inventory1";
	}
	if(data==3){
		window.location="inventory2";
	}
	if(data==4){
		window.location="inventory3";
	}
};
</script>
</html>